home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1994 October / 1994-10b.d64 / scrn cap demo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  77 lines

  1. 0 rem copyright 1994 - compute publications intl ltd - all rights reserved
  2. 5 rem written by james t. jones
  3. 10 poke 55,0:poke 56,56:clr:poke 53280,6:poke53281,6:cs$=chr$(147):print cs$
  4. 20 rv$=chr$(18):rem demo for 'capturing' and restoring screens
  5. 30 print chr$(14)chr$(8)chr$(5):cr$=chr$(13)
  6. 40 dv=peek(186):if dv<8 then dv=8
  7. 50 poke 147,0:sys 57812"scrn tile(680).o",dv,1:sys62631
  8. 60 sys 680
  9. 70 poke 214,3:print:poke211,4:input"[196]isk drive device number (8-15)";dv$
  10. 80 dv=val(dv$):if dv$="" then end
  11. 90 gosub510 :rem gazette routine for    checking disk drive
  12. 100 sys57812"italics.set",dv,0:poke780,0:poke781,0:poke782,56:sys65493
  13. 110 poke 53272,31:cr$=chr$(13):cd$=chr$(17):rem switch to italics.set font
  14. 120 sys57812"display font.o",dv,0:poke780,0:poke781,0:poke782,206:sys65493
  15. 130 gosub620:rem title screen
  16. 140 poke 147,0:sys 57812"scrn cap restr.o",dv,1:sys62631
  17. 150 sys680:printcd$cd$"[211][217][211] 52797 saves [211]creen 1."
  18. 160 printcd$"[211][217][211] 52825 restores [211]creen 1."
  19. 170 printcd$"[212]his is [211]creen 1.":sys 52797
  20. 180 poke 214,21:gosub470 
  21. 190 sys 680:printcd$cd$"[211][217][211] 52853 saves [211]creen 2."
  22. 200 printcd$"[211][217][211] 52881 restores [211]creen 2."
  23. 210 printcd$"[158][212]his is [211]creen 2.":sys 52853
  24. 220 poke 214,21:gosub470 
  25. 230 sys 680:printcd$cd$"[211][217][211] 52909 saves [211]creen 3."
  26. 240 printcd$"[211][217][211] 52937 restores [211]creen 3."
  27. 250 printcd$"[159][212]his is [211]creen 3.":sys 52909
  28. 260 poke 214,21:gosub470 
  29. 270 sys 680:printcd$cd$"[211][217][211] 52965 saves [211]creen 4."
  30. 280 printcd$"[211][217][211] 52993 restores [211]creen 4."
  31. 290 printcd$"[212]his is [211]creen 4.":sys 52965
  32. 300 poke 214,21:gosub470 
  33. 310 sys 680:printcd$cd$"[208]ress 1, 2, 3 or 4 to restore [211]creens"
  34. 320 printcd$"1, 2, 3 or 4, respectively."
  35. 330 printcd$"[208]ress [209] to exit to [194][193][211][201][195]."
  36. 340 geta$:if a$="" then340 
  37. 350 on val(a$) goto380 ,410,430,450
  38. 360 if a$="q" or a$="[209]" then poke 56,160:end
  39. 370 goto340 
  40. 380 sys 52825:rem restore screen 1
  41. 390 poke 214,21:gosub470 
  42. 400 goto310 
  43. 410 sys 52881:rem restore screen 2
  44. 420 poke 214,21:gosub470 :goto310 
  45. 430 sys 52937:rem restore screen 3
  46. 440 poke 214,21:gosub470 :goto310 
  47. 450 sys 52993:rem restore screen 4
  48. 460 poke 214,21:gosub470 :goto310 
  49. 470 print:print rv$"       press <[210][197][212][213][210][206]> to continue       "
  50. 480 d$="":get d$:if d$<>cr$ then480 
  51. 490 print cs$
  52. 500 return
  53. 510 close15:open 15,dv,15:close15
  54. 520 if st=0 then560 
  55. 530 printcd$"[212]urn your disk drive on and press"
  56. 540 print"<[210]eturn>."
  57. 550 b$="":get b$:if b$<>cr$ then550 
  58. 560 open15,dv,15,"i":input#15,er:close15
  59. 570 if er=0 then return
  60. 580 printcd$"[208]ut a diskette in your disk drive"
  61. 590 print"and press <[210]eturn>."
  62. 600 b$="":get b$:if b$<>cr$ then600 
  63. 610 goto560 
  64. 620 data "[199]azette presents ","[193] [196]emonstration of a [210]outine"
  65. 630 data "to [195]apture and [210]estore","[213]p to [198]our [211]creens"
  66. 640 data "[208]ress any key to continue"
  67. 650 for x=1 to 5:read au$(x):next
  68. 660 sys 680
  69. 670 sys 52736
  70. 680 poke 214,12:print:printspc(20-len(au$(1))/2)au$(1):print
  71. 690 printspc(20-len(au$(2))/2)au$(2):print
  72. 700 printspc(20-len(au$(3))/2)au$(3):print
  73. 710 printspc(20-len(au$(4))/2)au$(4)
  74. 720 poke214,22:print:printspc(20-len(au$(5))/2)au$(5)
  75. 730 get a$:if a$="" then730 
  76. 740 return
  77.